﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Albon.Model;
using Commonlib;
namespace DAL
{
    public class ErrorDAL
    {
        public bool addError(SystemError syserror)
        {
            SqlParameter[] parameters = {
               new SqlParameter("@userName",syserror.ErrorUser),
               new SqlParameter("@url",syserror.Url),
               new SqlParameter("@browser",syserror.Browser),
               new SqlParameter("@errordate",syserror.ErrorDate),
               new SqlParameter("@errorinfo",syserror.ErrorInfo),
               new SqlParameter("@remark",syserror.Remark)};
               int ret=SqlHelper.ExecuteNonQuery(SqlHelper.SqlConnectionString, CommandType.StoredProcedure, "p_erroradd", parameters);
               return ret==1;
        }
    }
}
